package com.bdqn.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bdqn.crm.pojo.SysUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Entity com.bdqn.crm.pojo.SysUser
 */
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 登錄
     *
     * @param usrName
     * @param usrPassword
     * @return
     */
    List<SysUser> findUsersByUsrNameAndUsrPassword(String usrName, String usrPassword);

    /**
     * 根据用户名查询用户对象
     *
     * @param usrName
     * @return
     */
    SysUser findUserByUsrName(@Param("usrName") String usrName);

    /**
     * 登录
     *
     * @return
     */
    SysUser login(@Param("usrName") String usrName, @Param("usrPassword") String usrPassword);

    /**
     * 分页查询所有角色数据
     *
     * @param usrName
     * @param roleId
     * @return
     */
    List<SysUser> selectPages(@Param("usrName") String usrName, @Param("roleId") Long roleId, @Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize);

}




